%option noyywrap nodefault

%{
#include <stdio.h>
#include "parser.tab.h"

char string_name[256];
%}

%%

"struct"                { yylval.strval = strdup(yytext); return STRUCT_BEGIN; }
[0-9a-zA-Z\"\:]+        { yylval.strval = strdup(yytext); return STRING_NAME;  }
"{"                     { yylval.strval = strdup(yytext); return LEFT_CURLY_BRACKETS; }
"}"                     { yylval.strval = strdup(yytext); return RIGHT_CURLY_BRACKETS; }
";"                     { yylval.strval = strdup(yytext); return SEMICOLON; }
"="                     { yylval.strval = strdup(yytext); return EQUAL_SIGN; }
[\r\n]                  { }
.                       { }
<<EOF>>                 { return YYEOF; }
%%

